package com.zbfmq.mqlistener;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2021/3/10  14:10
 * 描述:
 */
//@RabbitListener(queues = {"TEST-QUEUE2"})
//@Component
public class MyRabbitmqListener2 {


    @RabbitHandler
    public void msgHandler(Object message){

        Message message1=(Message)message;
        System.out.println("=====QUEUE2==111===>"+new String(message1.getBody()));

    }

}
